import 'package:json_annotation/json_annotation.dart';

part 'user_data.g.dart';


@JsonSerializable()
class UserData extends Object {

  @JsonKey(name: 'data')
  Data data;

  UserData(this.data,);

  factory UserData.fromJson(Map<String, dynamic> srcJson) => _$UserDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$UserDataToJson(this);

}


@JsonSerializable()
class Data extends Object {

  @JsonKey(name: 'memberId')
  int memberId;

  @JsonKey(name: 'coachId')
  int coachId;

  @JsonKey(name: 'headImage')
  String headImage;

  @JsonKey(name: 'nickName')
  String nickName;

  @JsonKey(name: 'description')
  String description;

  @JsonKey(name: 'gender')
  int gender;

  @JsonKey(name: 'authState')
  int authState;

  @JsonKey(name: 'isCoach')
  int isCoach;

  @JsonKey(name: 'tel')
  String tel;

  @JsonKey(name: 'accid')
  String accid;

  @JsonKey(name: 'liveToken')
  String liveToken;

  @JsonKey(name: 'mchMemberId')
  int mchMemberId;

  @JsonKey(name: 'isBind')
  int isBind;

  @JsonKey(name: 'isStar')
  int isStar;

  @JsonKey(name: 'vipInfo')
  List<VipInfo> vipInfo;

  @JsonKey(name: 'isSign')
  int isSign;

  Data(this.memberId,this.coachId,this.headImage,this.nickName,this.description,this.gender,this.authState,this.isCoach,this.tel,this.accid,this.liveToken,this.mchMemberId,this.isBind,this.isStar,this.vipInfo,this.isSign,);

  factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DataToJson(this);

}


@JsonSerializable()
class VipInfo extends Object {

  @JsonKey(name: 'levelId')
  int levelId;

  @JsonKey(name: 'levelName')
  String levelName;

  @JsonKey(name: 'levelExpire')
  String levelExpire;

  @JsonKey(name: 'priceLogo')
  String priceLogo;

  @JsonKey(name: 'levelBanner')
  String levelBanner;

  VipInfo(this.levelId,this.levelName,this.levelExpire,this.priceLogo,this.levelBanner,);

  factory VipInfo.fromJson(Map<String, dynamic> srcJson) => _$VipInfoFromJson(srcJson);

  Map<String, dynamic> toJson() => _$VipInfoToJson(this);

}

  
